package com.hlhj.carview.presenter

import android.content.Context
import com.example.mymvp.mvp.BasePresenter
import com.hlhj.carview.Iview.UploadView
import com.hlhj.carview.bean.MyBaseBean
import com.hlhj.carview.module.UploadModule
import java.io.File

/**
 * Created by Never Fear   on 2019\1\9 0009.
Never More....
 */
class UploadPresenter :BasePresenter<UploadModule,UploadView>(), UploadView {
    fun upload(file:File,c:Context){
        module?.upload(file,c)
    }
    fun upload(file:File,c:Context,tag:Int){
        module?.upload(file,c,tag)
    }

    override fun setUpResult(myBaseBean: MyBaseBean, tag: Int) {
        view?.setUpResult(myBaseBean, tag)
    }

    override fun setUpResult(myBaseBean: MyBaseBean) {
        view?.setUpResult(myBaseBean)
    }

    override fun createModule() {
        module= UploadModule()
        module.listener=this
    }
}